﻿@page "/"
@namespace JSViewer_Blazor.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
    Layout = null;
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <link rel="icon" type="image/png" href="~/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="~/favicon-32x32.png" sizes="32x32">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Blazor app with JS Viewer</title>
    <base href="~/" />
    <link rel="stylesheet" href="~/jsviewer.min.css" />
    <link href="~/site.css" rel="stylesheet" />
    <script src="~/jsViewer.min.js"></script>
    <script>
        var viewerInstance = null;
        window.initJsViewer = (containerSelector) => {
            viewerInstance = GrapeCity.ActiveReports.JSViewer.create({
                element: containerSelector,
            });
        }
        window.openReport = (reportId) => {
            if (viewerInstance) {
                viewerInstance.openReport(reportId);
            }
        }
    </script>

</head>
<body>
    <app>
        <component type="typeof(App)" render-mode="ServerPrerendered" />
    </app>

    <div id="blazor-error-ui">
        <environment include="Staging,Production">
            An error has occurred. This application may no longer respond until reloaded.
        </environment>
        <environment include="Development">
            An unhandled exception has occurred. See browser dev tools for details.
        </environment>
        <a href="" class="reload">Reload</a>
        <a class="dismiss">🗙</a>
    </div>

    <script src="_framework/blazor.server.js"></script>
</body>
</html>
